import { defineStore } from 'pinia';

export const cropImageStore = defineStore('cropImage', {
  state: (): any => ({
    upImage: null, // 用户上传图片 blob
    // cropImage: null, // 裁剪图片 blob
  }),

  actions: {
    setUpImage(img: any) {
      this.upImage = img;
    },

    // setCropImage(img: any) {
    //   this.cropImage = img;
    // },
  },

  // 配置持久化
  persist: true,
});
